Public Class frmOpacityBar
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
  Friend WithEvents tbOpacity As System.Windows.Forms.TrackBar
  Friend WithEvents btnOk As System.Windows.Forms.Button
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.tbOpacity = New System.Windows.Forms.TrackBar
    Me.btnOk = New System.Windows.Forms.Button
    CType(Me.tbOpacity, System.ComponentModel.ISupportInitialize).BeginInit()
    Me.SuspendLayout()
    '
    'tbOpacity
    '
    Me.tbOpacity.Location = New System.Drawing.Point(3, 14)
    Me.tbOpacity.Maximum = 100
    Me.tbOpacity.Name = "tbOpacity"
    Me.tbOpacity.Size = New System.Drawing.Size(309, 45)
    Me.tbOpacity.TabIndex = 0
    Me.tbOpacity.TickFrequency = 3
    Me.tbOpacity.Value = 100
    '
    'btnOk
    '
    Me.btnOk.Location = New System.Drawing.Point(8, 72)
    Me.btnOk.Name = "btnOk"
    Me.btnOk.Size = New System.Drawing.Size(304, 24)
    Me.btnOk.TabIndex = 1
    Me.btnOk.Text = "Set Opacity as 100%"
    '
    'frmOpacityBar
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(320, 104)
    Me.Controls.Add(Me.btnOk)
    Me.Controls.Add(Me.tbOpacity)
    Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
    Me.MaximizeBox = False
    Me.MinimizeBox = False
    Me.Name = "frmOpacityBar"
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
    Me.Text = "VS ChessMania v2"
    CType(Me.tbOpacity, System.ComponentModel.ISupportInitialize).EndInit()
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private t_opacityValue As Integer

  Private Sub frmOpacityBar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.Text = Application.ProductName
    tbOpacity.Value = Me.OpacityValue
    btnOk.Text = "Set Opacity as " & tbOpacity.Value & "%"
  End Sub

  Private Sub tbOpacity_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbOpacity.Scroll
    btnOk.Text = "Set Opacity as " & tbOpacity.Value & "%"
    t_opacityValue = tbOpacity.Value
  End Sub

  Public Property OpacityValue() As Integer
    Get
      Return t_opacityValue
    End Get
    Set(ByVal Value As Integer)
      t_opacityValue = Value
    End Set
  End Property

  Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click
    Me.OpacityValue = tbOpacity.Value
    Me.DialogResult = Windows.Forms.DialogResult.OK
    Me.Hide()
  End Sub
End Class
